public class Persion {
    private String name;
    private String sex;
    private int age;
    private int id;                 //身份证
    private static int count;       //身份证号自动增长的历史

    public Persion() {
        this.name = "";
        this.sex = "";
        this.age = 0;
        this.id = (int)(1 + Math.random()*100); //id 1-100
    }

    public Persion(String name, int age) {
        this.name = name;
        this.age = age;
    }


    public Persion(String name, String sex, int age) {
        this();
        this.name = name;
        this.sex = sex;
        this.age = age;
    }


    public void setName(String name) {
        this.name = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAge(int age) {
        this.age =age;
    }

    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    public String toString() {

        return name + " " + sex + " " + String.valueOf(age) + " " + id;
    }
}
